function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regenerator(){var h,t="function"==typeof Symbol?Symbol:{},e=t.iterator||"@@iterator",r=t.toStringTag||"@@toStringTag";function n(t,e,r,n){var i,a,o,s,c,u,l,f,d,e=e&&e.prototype instanceof v?e:v,e=Object.create(e.prototype);return _regeneratorDefine2(e,"_invoke",(i=t,a=r,l=n||[],f=!1,d={p:u=0,n:0,v:h,a:p,f:p.bind(h,4),d:function(t,e){return o=t,s=0,c=h,d.n=e,_}},function(t,e,r){if(1e||a{var t=_asyncToGenerator(_regenerator().m(function t(){var e,r,n;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:try{e=this.getRequestUrl(),r=new URLSearchParams(_objectSpread(_objectSpread({},WP_Statistics_Tracker_Object.hitParams),{},{referred:this.getReferred(),page_uri:this.getPathAndQueryString()})).toString(),(n=new XMLHttpRequest).open("POST",e,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.send(r),n.onreadystatechange=function(){var t;4===n.readyState&&(200===n.status?(t=JSON.parse(n.responseText),this.hitRequestSuccessful=!1!==t.status):(this.hitRequestSuccessful=!1,console.warn("WP Statistics: Hit request failed with status "+n.status)))}.bind(this)}catch(t){this.hitRequestSuccessful=!1,console.error("WP Statistics: Error sending hit request:",t)}case 1:return t.a(2)}},t,this)}));return function(){return t.apply(this,arguments)}})(),getRequestUrl:function(){var t=WP_Statistics_Tracker_Object.requestUrl+"/";return WP_Statistics_Tracker_Object.option.bypassAdBlockers?t=WP_Statistics_Tracker_Object.ajaxUrl:t+=WP_Statistics_Tracker_Object.hitParams.endpoint,t},updateTrackerObject:function(i){var a=!1,o=0;setTimeout(function t(){var e=document.getElementById("wp-statistics-tracker-js-extra");if(e)try{var r,n=e.innerHTML.match(/var\s+WP_Statistics_Tracker_Object\s*=\s*(\{[\s\S]*?\});/);n&&n[1]&&(r=JSON.parse(n[1]),!WP_Statistics_Tracker_Object.hitParams||JSON.stringify(WP_Statistics_Tracker_Object.hitParams)!==JSON.stringify(r.hitParams))?(WP_Statistics_Tracker_Object=r,!a&&i&&(a=!0,i())):++o<20?setTimeout(t,100):!a&&i&&(a=!0,i())}catch(e){console.error("WP Statistics: Error parsing WP_Statistics_Tracker_Object",e),!a&&i&&(a=!0,i())}else++o<20?setTimeout(t,100):!a&&i&&(a=!0,i())},50)},trackUrlChange:function(){var t;this.hasUrlChangeTrackerInitialized||(this.hasUrlChangeTrackerInitialized=!0,t=this,window.removeEventListener("popstate",t.handleUrlChange),history.pushState=function(){t.originalPushState.apply(history,arguments),t.handleUrlChange()},history.replaceState=function(){t.originalReplaceState.apply(history,arguments),t.handleUrlChange()},window.addEventListener("popstate",function(){t.handleUrlChange()}))},handleUrlChange:function(){var t=this;window.location.href!==this.lastUrl&&(this.lastUrl=window.location.href,this.updateTrackerObject(function(){t.checkHitRequestConditions()}))}}),window.WpStatisticsEventTracker||(window.WpStatisticsEventTracker={hasEventsInitializedOnce:!1,downloadTracker:!1,linkTracker:!1,init:(()=>{var t=_asyncToGenerator(_regenerator().m(function t(){return _regenerator().w(function(t){for(;;)switch(t.n){case 0:this.hasEventsInitializedOnce||WP_Statistics_Tracker_Object.isLegacyEventLoaded||(this.hasEventsInitializedOnce=!0,"undefined"!=typeof WP_Statistics_DataPlus_Event_Object&&(this.downloadTracker=WP_Statistics_DataPlus_Event_Object.options.downloadTracker,this.linkTracker=WP_Statistics_DataPlus_Event_Object.options.linkTracker,this.downloadTracker||this.linkTracker)&&this.captureEvent(),window.wp_statistics_event=this.handleCustomEvent.bind(this),"undefined"!=typeof WP_Statistics_Marketing_Event_Object&&this.captureCustomClickEvents());case 1:return t.a(2)}},t,this)}));return function(){return t.apply(this,arguments)}})(),handleCustomEvent:function(t){var e,r=this,n=1{var e=_asyncToGenerator(_regenerator().m(function t(e){return _regenerator().w(function(t){for(;;)if(0===t.n)return t.a(2,r.handleEvent(e))},t)}));return function(t){return e.apply(this,arguments)}})()),t.addEventListener("mouseup",(()=>{var e=_asyncToGenerator(_regenerator().m(function t(e){return _regenerator().w(function(t){for(;;)if(0===t.n)return t.a(2,r.handleEvent(e))},t)}));return function(t){return e.apply(this,arguments)}})())})},handleEvent:(()=>{var e=_asyncToGenerator(_regenerator().m(function t(e){var r;return _regenerator().w(function(t){for(;;)switch(t.n){case 0:if("mouseup"==e.type&&1!=e.button);else if(e=this.prepareEventData(e),e)return r=WP_Statistics_DataPlus_Event_Object.eventAjaxUrl,t.n=1,this.sendEventData(e,r);t.n=1;break;case 1:return t.a(2)}},t,this)}));return function(t){return e.apply(this,arguments)}})(),prepareEventData:function(t){var e={en:t.type,et:Date.now(),eid:t.currentTarget.id,ec:t.currentTarget.className,ev:"",mb:t.button,fn:"",fx:"",m:"",tu:"",pid:""};return"A"===t.currentTarget.tagName&&(e=this.extractLinkData(t,e)),"undefined"!=typeof WP_Statistics_Tracker_Object&&(e.pid=WP_Statistics_Tracker_Object.hitParams.source_id),e},extractLinkData:function(t,e){var r=t.target.textContent,n=t.currentTarget.href,i=WP_Statistics_DataPlus_Event_Object.fileExtensions,i=new RegExp("\\.("+i.join("|")+")$","i"),r=(r&&(e.ev=r),n&&(e.tu=n),t.currentTarget.classList.contains("woocommerce-MyAccount-downloads-file")||n.includes("download_file="));if(e.wcdl=r,(i.test(n)||r)&&(t=new URL(n).pathname,e.df=r?n.substring(n.lastIndexOf("download_file=")+14).split("&").shift():"",e.dk=r?n.substring(n.lastIndexOf("key=")+4).split("&").shift():"",e.en="file_download",e.fn=r?e.df:t.substring(t.lastIndexOf("/")+1).split(".").shift(),e.fx=r?e.df:t.split(".").pop()),"click"===e.en){if(!this.linkTracker)return!1;try{if(new URL(n).host===window.location.host)return!1}catch(t){}}return!("file_download"===e.en&&!this.downloadTracker)&&e},sendEventData:(()=>{var r=_asyncToGenerator(_regenerator().m(function t(e,r){var n,i,a;return _regenerator().w(function(t){for(;;)switch(t.p=t.n){case 0:for(n in i=new URLSearchParams,e)i.append(n,e[n]);if(r){t.n=1;break}throw new Error("AJAX URL is not defined.");case 1:return t.p=1,t.n=2,fetch(r,{method:"POST",keepalive:!0,body:i});case 2:t.v.ok,t.n=4;break;case 3:t.p=3,a=t.v,console.error("Error:",a);case 4:return t.a(2)}},t,null,[[1,3]])}));return function(t,e){return r.apply(this,arguments)}})()}),document.addEventListener("DOMContentLoaded",function(){var t=WP_Statistics_Tracker_Object.option.consentIntegration.name;t&&"borlabs_cookie"!==t||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),"wp_consent_api"===t&&handleWpConsentApiIntegration(),"real_cookie_banner"===t&&handleRealCookieBannerIntegration()});